home *** CD-ROM | disk | FTP | other *** search
/ Aminet 6 / Aminet 6 - June 1995.iso / Aminet / util / shell / axuucp_0_1.lha / axsh / rexx / axumsd < prev    next >
Encoding:
Text File  |  1995-03-22  |  1.0 KB  |  43 lines

  1. ;****** axuucp/axumsd ********************************************************
  2. ;
  3. ;   NAME
  4. ;    axumsd - Mailer daemon for AXsh to UMS delivery
  5. ;
  6. ;   SYNOPSIS
  7. ;    axumsd
  8. ;
  9. ;   DESCRIPTION
  10. ;    axumsd oberserves the system mailbox of users who's mail is to be
  11. ;    delivered to a foreign system thru UMS.  As soon as there is a new
  12. ;    message it will be imported into the UMS for further purposes.
  13. ;
  14. ;   AUTHOR
  15. ;    Tobias Ferber <tf@ganymed.hall.sub.org>
  16. ;
  17. ;*****************************************************************************
  18.  
  19. ;# axumsd -- daemon to deliver pending AXsh mail for local users to UMS
  20.  
  21. lab loop
  22.  
  23.   failat 21
  24.   set mbox=`waitnotify fmt=%s uumail:root uumail:tf uumail:system`
  25.  
  26.   if warn
  27.     skip buythefarm
  28.   endif
  29.  
  30.   failat 10
  31.   if exists $mbox ;notify was not `delete'
  32.     set usr=`rx "say substr('$mbox',1+lastpos(':','$mbox'))"`
  33.     rx >nil: ums:rexx/mbox2ums.rexx $user < $mbox
  34.     ums:bin/setfolder $user gnubbel quiet
  35.     delete quiet $mbox
  36.   endif
  37.  
  38. skip back loop
  39.  
  40. lab buythefarm
  41.   echo "axumsd terminated."
  42.   quit
  43.